import Vue from 'vue'
import Router from 'vue-router'
import indexpage from '@/view/index/indexTwo'
import newsdetail from '@/view/news/newsDetail'
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'indexpage',
      component: indexpage
    },
    {
      path: '/my',
      name: 'mypage',
      component: () => import('@/view/my/mypage.vue')
    },
    {
      path: '/news',
      name: 'newspage',
      component: () => import('@/view/news/news.vue')
    },
    {
      path: '/detail/:id',
      name: 'newsDetail',
      component: newsdetail
    },
    {
      path: '/consulting',
      name: 'consulting',
      component: () => import('@/view/consulting/consulting.vue')
    },
    {
      path: '/consultFrom',
      name: 'consultFrom',
      component: () => import('@/view/consulting/consultFrom.vue')
    },
    {
      path: '/myconsult',
      name: 'myconsult',
      component: () => import('@/view/consulting/myconsulting.vue')
    },
    {
      path: '/consultDetail/:id',
      name: 'consultDetail',
      component: () => import('@/view/consulting/consultDetail.vue')
    },
    {
      path: '/mylike',
      name: 'mylike',
      component: () => import('@/view/my/mylike')
    },
    {
      path: '/buy',
      name: 'buy',
      component: () => import('@/view/my/buy')
    },
    {
      path: '/pay/:select',
      name: 'pay',
      component: () => import('@/view/my/pay')
    },
    {
      path: '/userguide',
      name: 'userguide',
      component: () => import('@/view/my/userguide')
    }
  ]
})
